﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Tong;
public partial class aspnet_admin_bock_keyWord_CX_keyWord_Show : System.Web.UI.Page
{
    public TongUse TextData = new TongUse();
    protected void Page_Load(object sender, EventArgs e)
    {

        BindData();

    }


    protected void BindData()
    {
        DataTable TempTab = new DataTable();
        TempTab = TextData.SqlataSet("SELECT * FROM [Ask_user] order by askuser_id desc").Tables[0];
        GridView1.DataSource = TempTab.DefaultView;
        GridView1.DataBind();
    }



    protected void Button1_Click(object sender, EventArgs e)
    {

        GridView1.DataSource = TextData.SqlataSet("select * from [Ask_user]  where askuser_Name like '%" + askuser_Name.Text.Trim() + "%' order by askuser_id desc").Tables[0].DefaultView; 
        GridView1.DataBind();
    }


    /// <summary>
    /// 分页
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void pagechange(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        GridView1.DataSource = TextData.SqlataSet("SELECT * FROM [Ask_user] order by askuser_id desc").Tables[0].DefaultView; ;
        GridView1.DataBind();
    }



}
